#include <stdio.h>
#include <unistd.h>
#include <string.h>

#define SIZE 102

int main()
{
  char s[SIZE] = {0};
  const char* ss = "|/-\\";
  memset(s,0,SIZE);
  int cnt = 0;
  while(cnt <= 100)
  {
    printf("[%-100s][%%%d]%c\r",s,cnt,ss[cnt%4]);
    s[cnt++] = '=';
    fflush(stdout);
    usleep(200000);
  }
  printf("\n");
  return 0;
}
